package ntu.p2p.dht;

import java.util.HashMap;

import ntu.p2p.past.OverwritableContentHashPastContent;
import rice.p2p.commonapi.Id;

public class DHTContents extends OverwritableContentHashPastContent {

	private static final long serialVersionUID = 4257211423382650784L;

	private HashMap<DHTContentKey, DHTContent> dhtContents;
	
	public DHTContents(Id myId) {
		super(myId);
		this.dhtContents = new HashMap<DHTContentKey, DHTContent>();
	}	

	public boolean contains(DHTContent content) {
		return this.dhtContents.containsKey(content.getKey());
	}
	
	public HashMap<DHTContentKey, DHTContent> getDHTContents() {
		return this.dhtContents;
	}
}
